import Vue from 'vue'
import Router from 'vue-router'

const _import = file => () => import('@/views/' + file + '.vue')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'',
      name:'layout',
      component:_import('layout/layout'),
      children:[
          {
            path: '/',
            name: 'wechat',
            component: _import('wechat/index')
          },
          {
            path: '/address_book',
            name: 'addressBook',
            component: _import('addressBook/index')
          },
          {
            path: '/found',
            name: 'found',
            component: _import('found/index')
          },
          {
            path: '/mine',
            name: 'mine',
            component: _import('mine/index')
          }
      ]
    }
    
  ]
})
